package com.relife.core.entity;

import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

@Entity
@Table(name = "sys_process_config")
public class ProcessConfigEntity extends BaseEntity {

	/**
	 * 
	 */
	private static final long serialVersionUID = -5404755543759563684L;
	private DepartmentEntity depart;
	private ProcessSetEntity processSet;
	private List<ProcessConfigListEntity> pConfigList;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "DEPART_ID")
	public DepartmentEntity getDepart() {
		return depart;
	}

	public void setDepart(DepartmentEntity depart) {
		this.depart = depart;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "PROCESSSET_ID")
	public ProcessSetEntity getProcessSet() {
		return processSet;
	}

	public void setProcessSet(ProcessSetEntity processSet) {
		this.processSet = processSet;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "processConfig", cascade = CascadeType.REMOVE)
	public List<ProcessConfigListEntity> getpConfigList() {
		return pConfigList;
	}

	public void setpConfigList(List<ProcessConfigListEntity> pConfigList) {
		this.pConfigList = pConfigList;
	}

}
